

<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/6
 * Time: 10:21
 */
if($_POST['username'] == 'admin' && $_POST['userpwd'] == '888888'){
    setcookie('Token',md5($_POST['username'].$_POST['userpwd'].time()),time()+24*3600);
    echo '<h2>登录成功</h2>';
    echo '<a href="user.php">跳转至个人主页</a>';
}else if(empty($_POST['username'])){
    echo '<h2>用户名或密码错误</h2>','<br />';
    echo '<a href="login.php">请点击重新登陆<a/>';
}